package com.hitalkie.teacher.model;

import android.text.TextUtils;

import com.hitalkie.teacher.app.TalkieApplication;

/**
 * Date 9/21/16
 *
 * @author charliema
 */
public class User extends BaseModel {
    public long id; // 377017916569504,
    public String create_time; // "1472623214000",
    public String update_time; // "1472623214000",
    public int status; // 1,
    public int type; // 2, // 1.学生 2.外教 3.中教 4.staff 5.admin
    public String name; // "John",
    public int talkie_id; // 10000048,
    public int gender; //  0 未知 1 男 2 女
    public String birthday; // "",
    public String avatar; // "http://tva3.sinaimg.cn/crop.0.0.749.749.180/6b892bdfjw8f1fnil4fcjj20ku0kt0tp.jpg",
    public String email; // "",
    public String detail; // "",
    public String tc_user_sign; // 腾讯云的sign
    public String im_user_id; // im_10000048 腾讯云的user_id
    public String home_country; // null,
    public String home_state; // null,
    public String home_city; // null,
    public String current_country; // null,
    public String current_state; // null,
    public String current_city; // null,
    public String invitation_code; // null,
    public String visit_time; // "1472623214000",
    public float star; // 4.0
    public int is_reviewed ;
    public String promotion;

    public double balance;
    public String currency;

    // student
    public String fluency;
    public String pronunciation;
    public String listening;
    public int is_evaluated;//-1:学生不是当前课程的vip或者是VIP但是旷课了，0：未点评，1：已点评
    public boolean is_vip; // false,
    public boolean is_me; // true

    public Operation operation ;

    // --------
    public String token;

    public String getGender() {
        if (gender == 1) {
            return TextUtils.equals(TalkieApplication.getLanguage(), "en") ? "male" : "男";
        } else if (gender == 2) {
            return TextUtils.equals(TalkieApplication.getLanguage(), "en") ? "female" : "女";
        } else {
            return TextUtils.equals(TalkieApplication.getLanguage(), "en") ? "unknown" : "未知";
        }
    }
}
